using System;
using System.Windows;

namespace EMan.GUI.Common
{
  /// <summary>
  /// Represents an element that can be displayed wherever on the GUI
  /// </summary>
  public interface IHostedGuiElement
  {
    /// <summary>
    /// Asks element to close, will element be closed or no decides a presentation part.
    /// </summary>
    /// <seealso cref="Closed"/>
    void AskToClose();

    /// <summary>
    /// Raised when element is closed, host must do something in response of this event.
    /// </summary>
    event EventHandler Closed;

    /// <summary>
    /// WPF control to host on the GUI
    /// </summary>
    FrameworkElement Control{ get; }
  }
}